package com.qjs.shiro.test.permission;

import org.apache.shiro.authz.Permission;
import org.apache.shiro.authz.permission.PermissionResolver;
import org.apache.shiro.authz.permission.WildcardPermission;

public class MyPermissionResolver implements PermissionResolver{

	@Override
	public Permission resolvePermission(String permissionString) {
		System.out.println("MyPermissionResolver:"+permissionString);
		if(permissionString.startsWith("+")){
			return new 	MyPermission(permissionString);
		}
		return new WildcardPermission(permissionString);
	}

}
